package com.javadaemon.rpgengine.model;

import com.javadaemon.rpgengine.util.ResourceManager;
import com.javadaemon.rpgengine.util.ResourceManager.IMAGE;
import com.javadaemon.rpgengine.util.ResourceManager.OBJECT_RENDER;

/**
 * This enum encapsulates all the possible objects a tile can posses.
 * 
 * @author JavaDaemon
 */

public enum TILE_OBJECT {
    
    SMALL_ROOF_RIGHT_END(ResourceManager.OBJECT_RENDER.SMALL_ROOF_RIGHT_END_RENDER, true),
    SMALL_ROOF_MIDDLE(ResourceManager.OBJECT_RENDER.SMALL_ROOF_MIDDLE_RENDER, true),
    SMALL_ROOF_LEFT_END(ResourceManager.OBJECT_RENDER.SMALL_ROOF_LEFT_END_RENDER, true),
    SMALL_HOUSE_RIGHT_END(ResourceManager.OBJECT_RENDER.SMALL_HOUSE_RIGHT_END_RENDER, true),
    SMALL_HOUSE_LEFT_END(ResourceManager.OBJECT_RENDER.SMALL_HOUSE_LEFT_END_RENDER, true),
    DOOR(ResourceManager.OBJECT_RENDER.DOOR_RENDER, false),
    FENCE(ResourceManager.OBJECT_RENDER.FENCE_RENDER, true),
    SIGN(ResourceManager.OBJECT_RENDER.SIGN_RENDER, true),
    ;
    
    private final boolean blocking; // Wether this object type is blocking
    private final OBJECT_RENDER render; // The image of the object. 
    
    TILE_OBJECT(OBJECT_RENDER render, boolean blocking) {
	this.render = render;
	this.blocking= blocking;
    }
    
    public boolean isBlocking() {
	return blocking;
    }
    
    public OBJECT_RENDER getRender() {
	return render;
    }
}
